漆黒のシャルノス scr.xfl file unpacker/repacker

unpack:
    usage: unpack <.xfl> <.gsc>
    unpacks the xfl file or specific gsc file if specified.
    
pack:
    usage: pack <.xfl> <directory>
    packs a directory into a .xfl
    
decode:
    usage: decode <.gsc>
    converts a script file into a human readable format
    
encode:
    usage: encode <.txt>
    converts a txt file decoded with decode back to a .gsc
    
    skips all plaintext and just grabs the hexadecimal and game text values out
    of the text file.

genlinelen.py <.txt>:
    generates line indexes for a given .txt

decodeall.sh:
    decodes all the gsc files in a directory
    
progress.py:
    something I used to track my crappy atlas-style translation for testing.
    
XFL format:
    struct XFLHeader {
        int header;
        int size;
        int items;
    };
    struct FileHeader {
        char name[32];
        int start;
        int len;
    };
    
    starts with XFLHeader then X amount of FileHeaders, then all the file data
    follows.

GSC format:
    when decoding, a lot of useless information will appear around the top.
    This is from when I had no idea how it worked and was trying to see of any
    particular structs did anything important(they didnt).
    
    The translation relevant things will appear near the bottom. 
    The strings to translate are prefixed by a 'str: ' this is ignored by the 
    encoder and is just a marker that there is text. Displayed strings are
    preceded by a ^g then 3 numbers, newlines are ^n, centering is ^m, ^d
    also exists but I forget what it does so its not important.
    
    Above the game text will be a list of hexadecimal values (ie. '00 00 00 00')
    these values indicate the index of the string from the point after they are
    done being listed. The genlinelen.py tool will automatically calculate the 
    lengths needed and write them to the file.
    

Makefile:
    To simplify everything, there is an included Makefile to rebuild the
    scr.xfl file: `make xfl`
    
